

import request from '@/utils/request'
// var organizationNo = sessionStorage.getItem('organizationNo')
export default {
  /**
     * @description: 获取巡检计划名称列表 *代表必填
     * @param {String/Number} page *
     * @param {String/Number} size *
     * @param {Object} entity {componyId: 1} *
     * @param {String} order 排序方式 ASC DESC 默认ASC
     * @param {String} sort 自定义排序方式 'createTime'
     * @return {Array}
     */
  getInspectionPlanList(params) {
    return request.post("/v3/patrol/inspectionPlan/queryPageList", params)
  },
  // 添加
  addInspectionPlaniInfo(formData) {
    formData.organizationNo = sessionStorage.organizationNo
    return request.post("/v3/patrol/inspectionPlan/add", formData)
  },
  delInspectioniInfo(list) {
    return request.post(`/v3/patrol/inspectionPlan/del=${list}`)
  },
  delInspectionPlaniInfo(list) {
    return request.post(`/v3/patrol/inspectionPlan/delList`, { inspectionPlanIdList: list })
  },
  editInspectionPlaniInfo(formData) {
    return request.post("/v3/patrol/inspectionPlan/edit", formData)
  },
  queryInspectionPlan(inspectionPlanId) {
    return request.get(`/v3/patrol/inspectionPlan/query/${inspectionPlanId}`)
  }
}
